#include<iostream>
#include<cmath>
using namespace std;
const int MOD=1000000007;
int dp[105][105];
int main() {
    int K, L;
    cin >> K >> L;
    
    // 初始化第一个行为0
    for (int col = 0; col < K; col++) dp[0][col] = 1;

    // 
    for (int row = 1; row < L; row++) {
        for (int col = 0; col < K; col++) {
            for (int _ = 0; _ < K; _++) {
                if (abs(_ - col) == 1) continue;
                dp[row][col] += dp[row - 1][_];
                dp[row][col] %= MOD;
            }
        }
    }
    int res = 0;
    for (int _ = 1; _ < K; _++) {
        res = (res + dp[L - 1][_]) % MOD;
    }
    cout << res << endl;
    return 0;
}